/*
 * @Author: xuxu12138 1718324422@qq.com
 * @Date: 2024-01-20 09:03:09
 * @LastEditors: xuxu12138 1718324422@qq.com
 * @LastEditTime: 2024-01-23 13:36:17
 * @FilePath: /things-admin/src/base/api/SensitiveApi.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { request } from '@/base/Request';
import {sensitive} from '@/base/model/SensitiveApi'
import qs from 'qs'


//查询敏感词 /api/sensitiveWords
export const sensitiveWords = (params:{
    pageIndex:Number,
    pageSize:Number,
    word:String
}) =>request.get(sensitive, `/api/sensitiveWords?pageIndex=${params.pageIndex}&pageSize=${params.pageSize}&word=${params.word}`)


// 新增敏感词 /api/sensitiveWords
export const addsensitiveWords = (params:{
    word:String
}) => request.post(sensitive, '/api/sensitiveWords', qs.stringify(params))

// 批量新增 /api/sensitiveWords/batchAdd
export const batchAdd = (params:any) => request.post(sensitive, `/api/sensitiveWords/batchAdd`, params)

// 删除全部,批量新增 /api/sensitiveWords/delete/batchAdd
export const deletebatchAdd = (params:any) => request.post(sensitive, `/api/sensitiveWords/delete/batchAdd`, params)

// 根据id删除 /api/sensitiveWords/{id}
export const deletedata = (id:Number) => request.delete( `/api/sensitiveWords/${id}`)

// 修改 /api/sensitiveWords
export const putsensitiveWords = (params:any) => request.put(sensitive, `/api/sensitiveWords`, qs.stringify(params))

